﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BlueStarSetting : MonoBehaviour
{
    public void SetCount(int count)
    {
        if (count > 5)
            count = 5;
        else if (count < 1)
            count = 1;
        for (int i = transform.childCount-1; i > -1; i--)
        {
            transform.GetChild(i).gameObject.SetActive(false);
        }
        for (int i = 0; i < count; i++)
        {
            transform.GetChild(transform.childCount-i-1).gameObject.SetActive(true);
        }
    }
}
